package com.reader.api.service.impl.usercenter;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.reader.api.entity.usercenter.ReaderAppUserLog;
import com.reader.api.mapper.usercenter.ReaderAppUserLogMapper;
import com.reader.api.service.usercenter.IReaderAppUserLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @@description  服务实现类
 * @author        jiahaikun
 * @date          2018-11-02
 */
@Service
@Transactional
public class ReaderAppUserLogServiceImpl extends ServiceImpl<ReaderAppUserLogMapper, ReaderAppUserLog> implements IReaderAppUserLogService {


@Autowired
private ReaderAppUserLogMapper readerAppUserLogMapper;

/**
 * @function 多表关联查询
 * @param     currentPage 当前页
 * @param     size 每页显示条数
 * @param     parms 其它参数，自行定义
 * @return
 */
    @Transactional(readOnly=true)
    @Override
    public Page<Map<String, Object>> selectListPage(int currentPage,int size,String parms) {
            Page<Map<String, Object>> page = new Page<>(currentPage, size);// 当前页，总条数 构造 page 对象
            return page.setRecords(readerAppUserLogMapper.selectListPage(page,parms));
    }

}